//
//  AYMFamousDoctorController.m
//  QuickCure
//
//  Created by 徐绩 on 16/5/6.
//  Copyright © 2016年 ayumi. All rights reserved.
//

#import "AYMFamousDoctorController.h"



@interface AYMFamousDoctorController ()

@end

@implementation AYMFamousDoctorController

static NSString *const ID = @"cell";

- (void)viewDidLoad {
    [super viewDidLoad];

    [self setUpUi];
}

#pragma mark - 设置ui
- (void)setUpUi {
    
    self.title = @"名医通申请";
    self.view.backgroundColor = [UIColor whiteColor];
    
    //注册cell
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:ID];
    
    //cell的行高
    self.tableView.rowHeight = 100;
    
    //删除分割线
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    
}

#pragma mark - tableview的数据源代理方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 5;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID forIndexPath:indexPath];
    
    //去掉cell的黑边
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    
    UIImageView *checkImageView = [[UIImageView alloc] init];
    checkImageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"myt%ld",indexPath.row + 1]];
    
    [cell.contentView addSubview:checkImageView];
    //约束
    [checkImageView makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(cell.contentView);
        make.leading.equalTo(cell.contentView);
        make.bottom.equalTo(cell.contentView).offset(-5);
        make.trailing.equalTo(cell.contentView);
        
    }];
    
    return cell;
    
}

@end
